package com.fa4j.third.file.config;

import com.fa4j.third.base.config.ThirdAdapterConfigurer;
import com.fa4j.third.base.proxy.ThirdProxyFactoryBean;
import com.fa4j.third.base.service.ThirdConfigService;
import com.fa4j.third.file.service.ThirdFileService;
import jakarta.validation.Validator;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Bean;

import java.util.List;

@AutoConfiguration
public class ThirdFileAutoConfiguration {

    @Bean
    public ThirdProxyFactoryBean<ThirdFileService> thirdFileService(ThirdConfigService thirdConfigService,
                                                                    List<ThirdAdapterConfigurer> configurers,
                                                                    Validator validator) {
        return new ThirdProxyFactoryBean<>(ThirdFileService.class, thirdConfigService, configurers, validator);
    }

}
